//
//  THUIAlertView.h
//  MengLiao
//
//  Created by xiuxin on 2022/7/15.
//  Copyright © 2022 BaseBusiness. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "THWindowPriority.h"
#import "YYText.h"
typedef void (^THUIAlertViewHandler)(NSInteger index);

@interface HQUIAlertData : NSObject

@property (copy,nonatomic) NSString * title;

@property (copy,nonatomic) NSString * content;

@property (copy,nonatomic) NSAttributedString * contentAttributedString;

@property (strong,nonatomic) NSArray<NSString *> * btnTitleArray;

@property (copy,nonatomic) THUIAlertViewHandler handler;

@end

@interface THUIAlertView : UIView

@property (readonly,nonatomic) UILabel * titleLabel;

@property (readonly,nonatomic) YYLabel * contentLabel;

@property (readonly,nonatomic) UIButton * leftBtn;

@property (readonly,nonatomic) UIButton * rightBtn;

@property (nonatomic) BOOL dismissOnClickDimView;

@property (readonly,nonatomic) HQUIAlertData * alertData;

@property (nonatomic) HQWindowViewPriority windowPriority;

+ (THUIAlertView *)getInstance;

- (void)setHandler:(THUIAlertViewHandler)handler;

+ (THUIAlertView *)alertWithTitle:(NSString *)title message:(NSString *)message leftBtn:(NSString *)leftTitle rightBtn:(NSString *)rightTitle handler:(THUIAlertViewHandler)handler;

+ (THUIAlertView *)alertWithTitle:(NSString *)title attributedString:(NSAttributedString *)message leftBtn:(NSString *)leftTitle rightBtn:(NSString *)rightTitle handler:(THUIAlertViewHandler)handler;

- (void)loadAlertData:(HQUIAlertData *)alertData;

- (void)show;

- (void)dismiss;

@end
